package com.ganmiao.web.portal.controller.sys;

import com.ganmiao.annotation.NoAuthorization;
import com.ganmiao.resp.CommonResultRes;
import com.ganmiao.server.sys.service.SysOCRService;
import com.ganmiao.server.sys.vo.BizLicenseOCRVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @author jacky
 * @date 2024/3/26
 * @apiNote
 */
@Api(tags = "文字识别接口")
@RestController
@RequestMapping("/sysOCR")
@Slf4j
public class SysOCRController {

    @Autowired
    private SysOCRService sysOCRService;

    @NoAuthorization
    @ApiOperation("营业执照文字识别")
    @GetMapping("/getBizLicenseInfo")
    public CommonResultRes<BizLicenseOCRVo> getBizLicenseInfo(String imgUrl) throws Exception {
        BizLicenseOCRVo vo = sysOCRService.getBizLicenseInfo(imgUrl);
        return new CommonResultRes(vo);
    }

}
